﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;

namespace sn_scan
{
    public partial class ModelForm : MetroForm
    {

        ArrayList modelList = new ArrayList();
        public ModelForm()
        {
            InitializeComponent();
        }

        private void ModelForm_Load(object sender, EventArgs e)
        {
            string confPath = Utils.GetCurrentPath() + "\\conf";
            modelList = Utils.GetAllCurrentFileName(confPath);
            comboBoxModelList.Items.Clear();
            comboBoxModelList.DataSource = modelList;
            comboBoxModelList.Text = GlobeData.configName;
        }

        private void buttonExchange_Click(object sender, EventArgs e)
        {
            string configName = comboBoxModelList.SelectedValue.ToString();
            GlobeData.configName = configName;
            Utils.SaveConfig("model", GlobeData.configName);
            MessageBox.Show("切换型号请重启软件生效");
        }
    }
}
